﻿using System.ComponentModel.DataAnnotations;

namespace OConf.Model.RequestInput.CNameSpace
{
    public class CNameSpaceInputBase
    {
		/// <summary>
		/// 项目id
		/// </summary>
		[Required(ErrorMessage = "项目id不能为空")]
		[MaxLength(50, ErrorMessage = "项目id最多50个字符")]
		public string ProjectID { get; set; }

		/// <summary>
		/// 命名空间
		/// </summary>
		[Required(ErrorMessage ="命名空间不能为空")]
		[MaxLength(50, ErrorMessage ="命名空间最多50个字符")]
		[MinLength(1, ErrorMessage = "命名空间最少1个字符")]
		public string NameSpace { get; set; }
	}

	/// <summary>
	/// 新增命名空间请求参数
	/// </summary>
	public class AddCNameSpaceInput:CNameSpaceInputBase
    {
	}

	/// <summary>
	/// 删除命名空间请求参数
	/// </summary>
	public class DeleteCNameSpaceInput
    {
		/// <summary>
		/// ID
		/// </summary>
		[Required(ErrorMessage = "请求参数错误")]
		public string ID { get; set; }
	}

	/// <summary>
	/// 获取命名空间请求参数
	/// </summary>
	public class GetNameSpaceInput
    {
		/// <summary>
		/// 项目id
		/// </summary>
		[Required(ErrorMessage = "请求参数错误")]
		public string ProjectID { get; set; }
	}

	/// <summary>
	/// 获取命名空间请求参数
	/// </summary>
	public class GetNameSpaceDetailInput
    {
		/// <summary>
		/// ID
		/// </summary>
		[Required(ErrorMessage = "请求参数错误")]
		public string ID { get; set; }
	}
}
